﻿using System;
using Newtonsoft.Json;
using TuyennvLibrary.ServerApi.Controllers;

namespace ServerApi
{
    public partial class DevApi : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Config.server = Server;
            if (!ServerApi.Controllers.AdminController.checkLogin(Session))
            {
                Response.Write("Chưa đăng nhập");
            }
            else
            {
                object content = Code.error();
                content = JsonConvert.SerializeObject(ApiController.callApi(Request));
                //content = ApiController.callApi(Request);
                //content = new tivi().getconfig("100");
                Response.Write(content);
            }
        }
    }
}